﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Text.RegularExpressions;

public partial class Js_各种效果集合Demo_common : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        
    }
    protected void Button3_Click(object sender, EventArgs e)
    {
    }

    protected void Button2_Click(object sender, EventArgs e)
    {
        
    }
    protected void Button4_Click(object sender, EventArgs e)
    {
        string email = txtEmail.Text.ToString();
        if (Regex.IsMatch(email, "^\\w+((-\\w+)|(\\.\\w+))*\\@[A-Za-z0-9]+((\\.|-)[A-Za-z0-9]+)*\\.[A-Za-z0-9]+$"))
        {
            Page.ClientScript.RegisterStartupScript(GetType(), "", "alerts('ok');", true);
        }
        else
        {
            Page.ClientScript.RegisterStartupScript(GetType(), "", "alerts('no~~~~~~~~~~');", true);
        }
    }

    ///// <summary>
    /////清空文本框数据
    ///// </summary>  
    //public static void ClearTextBox()
    //{
    //    foreach (System.Web.UI.Control control in Controls)
    //    {
    //        for (int i = 0; i < control.Controls.Count; i++)
    //        {
    //            if (control.Controls[i] is System.Web.UI.WebControls.TextBox)
    //            {
    //                System.Web.UI.WebControls.TextBox tb = (System.Web.UI.WebControls.TextBox)control.Controls[i];
    //                tb.Text = "";
    //            }
    //        }
    //    }
    //}
}
